# $Id: PKGBUILD 150579 2012-02-18 15:20:31Z pierre $
# Maintainer:
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=mod_fastcgi
pkgver=2.4.6
pkgrel=4
pkgdesc="Apache module to support the FastCGI protocol"
arch=('i686' 'x86_64')
license=('custom')
url="http://www.fastcgi.com/"
depends=('apache')
options=('!libtool')
source=("http://www.fastcgi.com/dist/${pkgname}-${pkgver}.tar.gz"
        'lp381384.patch')
md5sums=('a21a613dd5dacf4c8ad88c8550294fed'
         '7dd09e6579cc9bf2f992bbd82d1d1537')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np1 -i "${srcdir}/lp381384.patch"
  cp Makefile.AP2 Makefile
  make top_dir=/usr/lib/httpd
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make top_dir=/usr/lib/httpd DESTDIR="${pkgdir}" install
  install -Dm644 docs/LICENSE.TERMS \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
